package cn.ekuma.pos.toolcommand.base;

import com.openbravo.data.basic.BasicException;
import com.openbravo.data.gui.MessageInf;

import cn.ekuma.epos.datalogic.I_DataLogicERP;
import cn.ekuma.epos.toolcommand.AbstractCommand;
import net.xeoh.plugins.base.annotations.PluginImplementation;


@PluginImplementation
public class BackUpDBCommand  extends AbstractCommand {

	@Override
	public void call() throws BasicException {
		try{
	        ((I_DataLogicERP)dataLogic).doBackDb();
	        new MessageInf(MessageInf.SGN_SUCCESS,"执行成功").show(null);
		 }catch (BasicException e) {
			e.printStackTrace();
			new MessageInf(e).show(null);
	     }
	}

	@Override
	public String getCommandName() {
		return "下载备份数据";
	}

	@Override
	public String getCommandCategoryName() {
		return "系统";
	}

}
